/**
 * @file   dtcl4.hpp
 * @author Kimmo Luoma <kimmo@PHOTON3>
 * @date   Fri Sep  7 13:36:04 2012
 * 
 * @brief  4th order time convolutionless approximation for decay rate 
 * 
 * Calculates the 4th order approximation for decay rate in Lorentzian 
 * reservoir. Analytical formula is from Breuer,Pettrucione: Theory of 
 * Open Quantum Systems (2002).
 */
#ifndef DTCL4_HPP
#define DTCL4_HPP
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <cmath>
using namespace boost::numeric::ublas;
class dtcl4{
private:
  /** 
   * n x 3 matrix of parameters. Type matrix<double>.
   * n is the number of decay channels.
   * params(k,0) is gamma for channel k,
   * params(k,1) is lambda for channel k,
   * params(k,2) is delta for channel k.
   */
  matrix<double> params;	/**< n x 3 matrix<double> */
public:
  dtcl4();			/**< Default constructor */
  /** 
   * Constructor.
   * 
   * @param par n x 3 matrix of parameters. Type matrix<double>.
   * n is the number of decay channels.
   * params(k,0) is gamma for channel k,
   * params(k,1) is lambda for channel k,
   * params(k,2) is delta for channel k.
   */
  dtcl4(matrix<double> par);	/**< Constructor */
  /** 
   * Copy constructor
   * 
   * @param d object of type dtcl4
   */
  dtcl4(const dtcl4& d);	/**< copy constructor */
  /** 
   * Copy assignment
   * 
   * @param d object of type dtcl4
   * 
   * @return object of type dtcl4
   */
  dtcl4& operator=(const dtcl4& d); /**< copy assignment */
  /** 
   * operator()
   * 
   * @param double t. Time when decayrates are evaluated 
   * 
   * @return vector<double> of length n, where n is the number of 
   * decay channels.
   */
  vector<double> operator()(double t);
};


#endif
